#!/bin/sh
# This regression test is a part of SIPp.
# A call runs one step per turn, so a reply to the <send> before a
# <sendCmd> can arrive before the command is sent; it was taken as
# unexpected and every call failed.
. "`dirname "$0"`/../functions"; init

sippbg -sf uas.xml -i 127.0.0.1 -p 26640 -m 5
sippbg -sf b.xml -i 127.0.0.1 -p 26641 -3pcc 127.0.0.1:26642 -m 5
sippfg -sf a.xml -i 127.0.0.1 -p 26643 127.0.0.1:26640 \
    -3pcc 127.0.0.1:26642 -m 5 -timeout 5 -timeout_error \
    >/dev/null 2>&1
status=$?

if test $status -ne 0; then
    fail "3PCC A ended with $status"
else
    ok
fi
